10 LOCATE 3,1:PRINT" This program calculates and plots"
11 PRINT"the trajectories of alpha particles"
12 PRINT"(charge +2, mass number 4) colliding"
13 PRINT"with the nucleus of a gold atom (charge"
14 PRINT"+79, mass number 197)."
15 FOR I=1 TO 5000:NEXT I
16 DIM U(4,4),X(4,4),DX(2,4),DU(2,4)
17 M1=1:M2=49.25
25 G=-0.1
26 G=G*M1*M2
30 TL=0:TU=10:DT=0.2
45 X(1,1)=0
46 PRINT
50 X(1,2)=14
51 PRINT"The impact parameter of the collision"
52 PRINT"is the distance of closest approach"
53 PRINT"of the alpha particle to the nucleus if"
54 PRINT"there were no repulsive force between"
55 PRINT"them, so that the alpha particle moved"
56 PRINT"in a straight line past the nucleus."
57 PRINT:PRINT" Select an impact parameter between":PRINT"+ 4 and - 4. (+4 gives a wide miss;":PRINT"+ 1 gives a very near miss;":PRINT"0 gives a head-on collision.)"
58 INPUT"Impact parameter = ",X(1,3)
60 X(1,4)=0
65 U(1,1)=3
70 U(1,2)=0
75 U(1,3)=0
80 U(1,4)=0
83 SCREEN 1
84 LINE (0,0)-(0,199):LINE-(319,199):LINE-(319,0):LINE-(0,0)
85 T2=2*DT:T5=0.5*DT
95 K1=G/M1:K2=G/M2
96 K3=K2/K1
100 T=TL-DT
105 NT=(TU-TL)/DT
110 T=T+DT
115 K=1
120 L=1
125 GOSUB 5000
130 FOR I=1 TO 4
135 X(2,I)=X(1,I)+DT*DX(1,I)
140 U(2,I)=U(1,I)+DT*DU(1,I)
145 NEXT I
150 K=2:L=2
155 GOSUB 5000
160 FOR I=1 TO 4
165 X(2,I)=X(1,I)+T5*(DX(1,I)+DX(2,I))
170 U(2,I)=U(1,I)+T5*(DU(1,I)+DU(2,I))
175 NEXT I
200 FOR N=2 TO NT
205 T=T+DT
210 L=1:K=2
215 GOSUB 5000
220 FOR I=1 TO 4
225 X(3,I)=X(1,I)+T2*DX(1,I)
230 U(3,I)=U(1,I)+T2*DU(1,I)
235 NEXT I
240 L=2:K=3
245 GOSUB 5000
250 FOR I=1 TO 4
255 X(4,I)=X(2,I)+T5*(DX(1,I)+DX(2,I))
260 U(4,I)=U(2,I)+T5*(DU(1,I)+DU(2,I))
265 NEXT I
266 L=2:K=4:GOSUB 5000
267 FOR I=1 TO 4
268 X(4,I)=X(2,I)+T5*(DX(1,I)+DX(2,I))
269 U(4,I)=U(2,I)+T5*(DU(1,I)+DU(2,I))
270 NEXT I
271 FOR I=1 TO 4
275 X(1,I)=X(2,I)
280 X(2,I)=X(4,I)
285 U(1,I)=U(2,I)
290 U(2,I)=U(4,I)
295 NEXT I
318 GOSUB 4000
320 NEXT N
325 LOCATE 22,1:PRINT" ":PRINT" "
327 LOCATE 22,1
330 PRINT" Run complete."
331 PRINT"Enter R for another run."
332 A$=INKEY$:IF A$="" THEN GOTO 332
335 IF A$="R" OR A$="r" THEN GOTO 340
337 CLS:SCREEN 0:LOCATE 1,1:END
340 LOCATE 22,1:PRINT"New impact parameter (>-6 and <+6) = ";